import request from '@/utils/request'

export function deptList(token) {
  return request({
    url: '/system/dept/deptList',
    method: 'get'
  })
}
export function deptAll() {
  return request({
    url: '/system/dept/deptAll',
    method: 'get'
  })
}

export function insert(data) {
  return request({
    url: '/system/dept/insert',
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: '/system/dept/update',
    method: 'post',
    data
  })
}
export function removeUser(data) {
  return request({
    url: '/system/dept/removeUser',
    method: 'post',
    data
  })
}


export function getUserListByDeptId(id) {
  return request({
    url: '/system/dept/getUserListByDeptId',
    method: 'get',
    params:{}
  })
}
export function deleteById(id) {
  return request({
    url: '/system/dept/delete',
    method: 'get',
    params:{id}
  })
}


export function insertUserList(data) {
  return request({
    url: '/system/dept/insertUserList',
    method: 'post',
    data
  })
}

